

#pragma once

#include <vector>
#include "Error.h"



template <class T>
class CORE_API VectorDLL
{
public:

	typedef std::vector< T >    vector_type;

	
private:
	vector_type*  m_vector;

public:

	
	VectorDLL()
	{
		m_vector = new vector_type();
	}
	
	~VectorDLL()
	{
		delete m_vector;
		m_vector = NULL;
	}

	std::vector<T>& to_vector()
	{
		return *m_vector;
	}

	size_t size() const
	{
		return m_vector->size();
	}

	void clear()
	{
		m_vector->clear();
	}

	void reserve(size_t n)
	{
		m_vector->reserve(n);
	}

	bool empty() const 
	{
		return m_vector->empty();
	}

	void push_back ( const T& x )
	{
		m_vector->push_back(x);
	}



	T* begin()
	{
		*m_vector->begin();
	}

	T* end()
	{
		*m_vector->end();
	}

	const T* cbegin()
	{
		*m_vector->cbegin();
	}

	const T* cend()
	{
		*m_vector->cend();
	}



	T* erase ( T*  position )
	{
		return *m_vector->erase(position);
	}

	T* erase ( T* first, T* last )
	{
		return *m_vector->erase(first, last);
	}
 

	T& at(size_t _Pos)
	{
		return m_vector->at(_Pos);
	}

	const T& operator [] (size_t _Pos) const
	{
		return m_vector->at(_Pos);
	}





};